import random

def generate_triangle(n):
    triangle = []
    for i in range(1, n+1):
        row = [random.randint(1, 100) for _ in range(i)]
        triangle.append(row)
    return triangle

if __name__ == "__main__":
    n = 5  # 示例：生成5行的三角形
    triangle = generate_triangle(n)
    print(triangle)    